/**
 * Created by Administrator on 2017/4/7.
 */
(function(angular){
    //  详情页控制器
    angular.module('mainApp_subject_contrller',[])
        .controller('subject_contrller',['$scope','jsonp_services','$routeParams','$route',
            function($scope,jsonp_services,$routeParams,$route){
                jsonp_services.getJSONP(
                    'https://api.douban.com/v2/movie/subject/'+$routeParams.id,
                    {},
                    function(data){
                        //电影类型
                        $scope.genres = data.genres
                        //上映年份
                        $scope.year = data.year
                        //介绍
                        $scope.summary = data.summary
                        //播放链接APP
                        $scope.mobile_url = data.mobile_url
                        //播放链接PC
                        $scope.alt = data.alt
                        //标题
                        $scope.title = data.title
                        //图片
                        $scope.image = data.images
                        //评分
                        $scope.rating = data.rating
                        //异步刷新
                        $scope.$apply()
                    }
                )
        }])
})(angular)